/**   
 * @Title: UserInformation.java 
 * @Package cn.edu.cdtu.healthserver.domain 
 * @Description: TODO 
 * @author  
 * @date 
 * @version V0.0   
 */
package cn.edu.cdtu.healthserver.domain;

/** 
 * @ClassName: UserInformation 
 * @Description: TODO
 * @author 
 * @date 
 *  
 */
public class UserInformation {

	private int id;
	private String account;
	private String password;
	private String name;
	/** 
	 * @Title: UserInformation
	 * @Description: TODO
	 * @throws 
	 *
	 */
	public UserInformation() {
	}
	
	
	/** 
	 * @Title: UserInformation
	 * @Description: TODO
	 * @throws 
	 *
	 * @param account
	 * @param password
	 * @param name
	 */
	public UserInformation(String account, String password, String name) {
		this.account = account;
		this.password = password;
		this.name = name;
	}

	/** 
	 * @Title: UserInformation
	 * @Description: TODO
	 * @throws 
	 *
	 * @param id
	 * @param account
	 * @param password
	 * @param name
	 */
	public UserInformation(int id, String account, String password, String name) {
		this.id = id;
		this.account = account;
		this.password = password;
		this.name = name;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the account
	 */
	public String getAccount() {
		return account;
	}
	/**
	 * @param account the account to set
	 */
	public void setAccount(String account) {
		this.account = account;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}


	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}


	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}


	/* (non-Javadoc)
	 * <p>Title: hashCode</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((account == null) ? 0 : account.hashCode());
		result = prime * result + id;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((password == null) ? 0 : password.hashCode());
		return result;
	}


	/* (non-Javadoc)
	 * <p>Title: equals</p> 
	 * <p>Description: </p> 
	 * @param obj
	 * @return 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserInformation other = (UserInformation) obj;
		if (account == null) {
			if (other.account != null)
				return false;
		} else if (!account.equals(other.account))
			return false;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		return true;
	}


	/* (non-Javadoc)
	 * <p>Title: toString</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "UserInformation [id=" + id + ", account=" + account
				+ ", password=" + password + ", name=" + name + "]";
	}
}
